<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // 1. 是 === 比较 即比较类型 又比较值

    // 2. 不写break 会发生穿透

    // 3. 变量
    var age = 19
    switch(age) {
      case 16:
      case 17:
      case 18:
        console.log('咱们是学生')
        break
      case 19:
      case 20:
        console.log('上班')
        break
      default:  
        console.log('请输入合理年龄')
    }
  </script>
</body>
</html>